﻿@*@model Model.tb_PersonAptitude
@{
    ViewBag.Title = "doPersonAptitude";
}
<!DOCTYPE html>

<head>
    <meta name="viewport" content="width=device-width" />
    <title>人员资质</title>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/jquery-easyui/themes/default/easyui.css")'>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/jquery-easyui/themes/icon.css")'>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/jquery-easyui/demo.css")'>
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/uploader/uploadify.css")' />
    <link rel="stylesheet" type="text/css" href='@Url.Content("~/Scripts/Validform/style.css")'  />
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery-1.8.2.min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery-easyui/jquery.easyui.min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery-easyui/locale/easyui-lang-zh_CN.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/uploader/jquery.uploadify.min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/uploader/swfobject.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/MicrosoftAjax.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/MicrosoftMvcAjax.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/Validform/Validform_v5.3.2_min.js")'></script>
    <script type="text/javascript" src='@Url.Content("~/Scripts/My97DatePicker/WdatePicker.js")'></script>
    <script type="text/javascript">
        $(document).ready(function () {
            /*页面控件验证*/
            $("#_name").attr("datatype", "*");
            //$("#_telnumber").attr("datatype", "*");
            //$("#_cellphone").attr("datatype", "*");
            $("#uploadfrm").Validform({
                tiptype: 3
            });

            /*上传文件控件*/
            $("#uploadify").uploadify({
                'uploader': '@Url.Content("~/Scripts/uploader/uploadify.swf")',
                'script': '@Url.Action("Import", "Documents")',
                'cancelImg': '@Url.Content("~/Scripts/uploader/cancel.png")',
                'folder': 'UpFile',
                'queueID': 'fileQueue',
                'auto': false,
                'multi': true,
                'height': 20,
                'width': 75,
                'fileSizeLimit': '10240KB',
                'fileDesc': '图片文件(*.png;*.gif;*.jpg;*.bmp;*.jpeg)',
                'fileExt': '*.png;*.gif;*.jpg;*.bmp;*.jpeg',
                'buttonImg': '@Url.Content("~/Content/Images/daochuwenjian.png")',
                'onComplete': fun,
                'onSelect': function (e, queueId, fileObj) {
                    $('#uploadify').uploadifyUpload();
                },
                'onCancel': function (file) {

                }
            });
            /*结束 上传文件控件*/
        });

        function fun(event, queueID, fileObj, response, data) {
            if (response == "false") {
                alert("文件上传出错！");
            }
            else {
                if (/\.(pdf)$/.test(response)) {
                    response = response.substring(0, response.length - 4) + ".swf";
                }
                var _txtName = $('#_txtName').val();
                var _certificate = $('#_certificate').val();
                $('#_certificate').val(_certificate + "," + response);
                $('#_txtName').val(_txtName + "," + fileObj.name);
                $('#txtSize').val(parseInt(fileObj.size / 1000));
            }
        }
        function handle(e) {
            if (e == "1") {
                alert("保存成功！");
            } else {
                alert("保存失败！");
            }
        }
        function failed(e) {
            alert("保存失败！");
        }
    </script>
    <style type="text/css">
        .divList {
            position: absolute;
            top: 40px;
            left: 1px;
            z-index: 99;
            width: 1048px;
        }

        a {
            text-decoration: none;
            color: #000;
        }

            a img {
                border: 0;
            }

        .biaoge {
            width: 1040px;
            font-family: '宋体';
            font-size: 12px;
            color: #10607c;
        }

            .biaoge td {
                text-align: center;
                height: 26px;
                vertical-align: middle;
                border: 1px solid #d4d3d3;
            }

        .data_tab02 {
            height: 22px;
            margin: 0px;
            padding-left: 2px;
            background: url(Content/Images/tab_bg02.gif) repeat-x;
        }

            .data_tab02 dd {
                width: 100px;
                height: 22px;
                line-height: 22px;
                float: left;
                text-align: center;
                cursor: pointer;
                margin-right: 2px;
            }

                .data_tab02 dd a {
                    display: block;
                    clear: both;
                    background: url(../../Content/Images/dlbeijing.png);
                    width: 100px;
                    height: 25px;
                    color: #FFFFFF;
                    font-size: 13px;
                }

                    .data_tab02 dd a:hover {
                        color: #ff9c00;
                    }

                    .data_tab02 dd a:focus {
                        color: #ff9c00;
                    }
    </style>
</head>
<body>
    <div style="background: #faf1e8; height: 30px; width: 100%; top: 1px; position: absolute; z-index: 99; left: 1px;">
        <table align="left" width="100%" height="27px">
            <tr>
                <td width="1029" style="font-family: '宋体'; font-size: 12px; color: #10607c;">当前位置：人员管理<img style="text-align:center;vertical-align:middle;height:10px" src='@Url.Content("~/Content/Images/位置.png")' />人员资质<img style="text-align:center;vertical-align:middle;height:10px" src='@Url.Content("~/Content/Images/位置.png")' />新增 </td>
            </tr>
        </table>
    </div>
    <div class="divList">
        @using (Ajax.BeginForm("doPersonAptitudeInfoCU", "PersonAptitude", new AjaxOptions { HttpMethod = "Post", OnSuccess = "handle", OnFailure = "failed" }, new { @id = "uploadfrm" }))
        {
            @Html.HiddenFor(m => m.id, new { @id = "id" })
            @Html.HiddenFor(m => m.createDate, new { @id = "createDate" })
            @Html.HiddenFor(m => m.createUser, new { @id = "createUser" })
            @Html.HiddenFor(m => m.updateDate, new { @id = "updateDate" })
            @Html.HiddenFor(m => m.updateUser, new { @id = "updateUser" })
            @Html.HiddenFor(m => m.certificate, new { @id = "_certificate" })
            List<SelectListItem> list = new List<SelectListItem>();
            list.Add(new SelectListItem() { Text = "请选择", Value = "", Selected = true });
            list.Add(new SelectListItem() { Text = "男", Value = "1" });
            list.Add(new SelectListItem() { Text = "女", Value = "0" });
            SelectList selectListSex = new SelectList(list, "Value", "Text");
            <table align="left" style="font-family: '宋体'; font-size: 12px;">
                <tr>
                    <td width="90px" align="right">姓名：</td>
                    <td align="left">@Html.TextBoxFor(m => m.name, new { @id = "_name" })</td>
                    <td width="90px" align="right">性别：</td>
                    <td align="left">
                        @Html.DropDownListFor(m => m.sex, selectListSex, new { @id = "_sex" })
                    </td>
                </tr>
                <tr>
                    <td width="90px" align="right" valign="middle">联系电话：</td>
                    <td align="left">
                        @Html.TextBoxFor(m => m.telnumber, new { @id = "_telnumber" })
                    </td>
                    <td width="90px" align="right">手机：</td>
                    <td align="left">
                        @Html.TextBoxFor(m => m.cellphone, new { @id = "_cellphone" })
                    </td>
                </tr>
                <tr>
                    <td width="90px" align="right">资质证书：</td>
                    <td width="80" align="left">
                        <table align="left">
                            <tr>
                                <td>
                                    <input type="text" id="_txtName" /></td>
                                <td>
                                    <input type="text" id="uploadify" /></td>
                            </tr>
                        </table>
                    </td>
                    <td width="90px" align="right"></td>
                    <td width="80" align="left"></td>
                </tr>
                <tr>
                    <td colspan="4" align="center">
                        <a href="javascript:void(0)" onclick="$('#uploadfrm').submit()">
                            <img src="~/Content/Images/baocun.png" height="20px" /></a>
                        <a href="javascript:void(0)" onclick="history.go(-1)">
                            <img src="~/Content/Images/fanhui.png" height="20px" />
                        </a></td>
                </tr>
            </table>
        }
    </div>
</body>
*@